package com.patterns.demo.responsibility;

/**
 * Author: SamGroves
 * <p>
 * Description:
 * <p>
 * Date: 2017/12/19
 */
public class MyHandler extends AbstractHandler implements Hander {

    private String name;

    public MyHandler(String name) {
        this.name = name;
    }

    @Override
    public void operator() {
        System.out.println(name + "deal!");
        if (getHander() != null) {
            getHander().operator();
        }
    }
}
